package me.spring.cloud.common.components.validator.annotation;

import me.spring.cloud.common.components.util.enums.StringTypeEnum;
import me.spring.cloud.common.components.validator.annotation.constraint.StringTextValidator;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import javax.validation.Constraint;
import javax.validation.Payload;

@Documented
@Constraint(validatedBy = StringTextValidator.class)
@Target({ElementType.METHOD, ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
public @interface StringText {

  String message() default "{Please provide us a valid value}";

  Class<?>[] groups() default {};

  Class<? extends Payload>[] payload() default {};

  StringTypeEnum formatUnit() default StringTypeEnum.CHINESS_ENGLISH_NUMBER;
}